module share_data
  implicit none
  save
  integer :: n = 5
end module share_data

program tes
  use share_data
  implicit none
!  call tt
  call tt
  write(*,*) n
end program tes

subroutine tt
  use share_data
  implicit none
  write(*,*) n
  n = 8
end subroutine tt
